//
//  JZPickerView.h
//  NHBaseUIFrameWork
//
//  Created by 刘星辰 on 2018/1/30.
//  Copyright © 2018年 刘星辰. All rights reserved.
//

#import <UIKit/UIKit.h>

@class JZPickerView;
@protocol JZPickerViewDelegate <NSObject>

-(void)toobarDonBtnHaveClick:(JZPickerView *)pickView areaInfo:(NSArray *)info;
-(void)toobarDonBtnHaveClick:(JZPickerView *)pickView resultString:(NSString *)resultString;
-(void)toobarDonBtnHaveClick:(JZPickerView *)pickView selectIndex:(NSInteger)selectIndex;
-(void)toobarDonCancelClick:(JZPickerView *)pickView;
@end

@interface JZPickerView : UIView<UIPickerViewDelegate>

@property(nonatomic,weak) id<JZPickerViewDelegate> delegate;

@property(nonatomic,strong)UIPickerView *pickerView;
@property(nonatomic,strong)UIDatePicker *datePicker;


//增加一个默认选择selectIndex
@property(nonatomic,assign) NSInteger selectIndex;


/**
 显示区域选择的按钮

 @return picker
 */
+ (instancetype)showAreaPicker;

/**
 *  通过plistName添加一个pickView
 *
 *  @param plistName          plist文件的名字
 *
 *  @return 带有toolbar的pickview
 */
-(instancetype)initPickviewWithPlistName:(NSString *)plistName;

/**
 *  通过plistName添加一个pickView
 *
 *  @param array              需要显示的数组
 *
 *  @return 带有toolbar的pickview
 */
-(instancetype)initPickviewWithArray:(NSArray *)array;

/**
 *  通过时间创建一个DatePicker
 *
 *  @param date               默认选中时间 传nil代表当前时间
 *
 *  @return 带有toolbar的datePicker
 */
-(instancetype)initDatePickWithDate:(NSDate *)defaulDate datePickerMode:(UIDatePickerMode)datePickerMode;

/**
 *   移除本控件
 */
-(void)remove;

/**
 *  显示本控件
 */
-(void)showOn:(UIViewController *)superView;

/**
 *  设置PickView的颜色
 */
-(void)makePickViewColer:(UIColor *)color;

/**
 *  设置toobar的文字颜色
 */
-(void)makeTooltextColor:(UIColor *)color;

/**
 *  设置toobar的背景颜色
 */
-(void)makeToolbarBgColor:(UIColor *)color;


/**
 *  设置centerLabel的字体颜色
 */

- (void)makrCenterLabelTextColor:(UIColor *)color;

/**
 *  设置toobar的右按钮文字
 */
- (void)makeToolbarRightBtnName:(NSString *)name;

/**
 *  设置toobar的中间文字
 */
- (void)makeToolbarCenterText:(NSString *)text;

@end
